import { Menu } from '@/typings/menu'

/** 示例相关的菜单，打包会忽略，只开发可见 */
const menus: Menu[] = (function () {
    const { VITE_SERVICE_ENV = 'dev' } = import.meta.env
    if (VITE_SERVICE_ENV == 'dev') {
        return [
            {
                name: 'Demo',
                icons: 'pajamas:issue-type-test-case',
                permissionKey: 'demo',
                isMenu: true,
                openType: 1,
                items: [
                    {
                        name: '文档',
                        icons: 'mdi:file-document-multiple-outline',
                        permissionKey: 'document',
                        isMenu: true,
                        openType: 1,
                        items: [
                            {
                                name: 'vue文档',
                                icons: 'logos:vue',
                                permissionKey: 'document_vue',
                                url: 'https://v3.cn.vuejs.org/',
                                isMenu: true,
                                openType: 5
                            },
                            {
                                name: 'vite文档',
                                icons: 'logos:vitejs',
                                permissionKey: 'document_vite',
                                url: 'https://cn.vitejs.dev/',
                                isMenu: true,
                                openType: 5
                            },
                            {
                                name: 'naive文档',
                                icons: 'logos:naiveui',
                                permissionKey: 'document_naive',
                                url: 'https://www.naiveui.com/zh-CN/os-theme/docs/introduction',
                                isMenu: true,
                                openType: 5
                            },
                            {
                                name: '项目文档',
                                icons: 'local:jbolt_logo',
                                permissionKey: 'document_project',
                                url: 'http://vue-doc.jbolt.cn/',
                                isMenu: true,
                                openType: 5
                            }
                        ]
                    },
                    {
                        name: '仪表盘',
                        icons: 'mdi:monitor-dashboard',
                        permissionKey: 'dashboard',
                        isMenu: true,
                        openType: 1,
                        items: [
                            {
                                name: '分析页',
                                url: '/dashboard/analysis',
                                icons: 'icon-park-outline:analysis',
                                permissionKey: 'dashboard_analysis',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: '工作台',
                                url: '/dashboard/workbench',
                                icons: 'icon-park-outline:workbench',
                                permissionKey: 'dashboard_workbench',
                                isMenu: true,
                                openType: 1
                            }
                        ]
                    },
                    {
                        name: '插件示例',
                        icons: 'clarity:plugin-line',
                        permissionKey: 'plugin',
                        isMenu: true,
                        openType: 1,
                        items: [
                            {
                                name: '图表',
                                icons: 'mdi:chart-areaspline',
                                permissionKey: 'plugin_charts',
                                isMenu: true,
                                openType: 1,
                                items: [
                                    {
                                        name: 'ECharts',
                                        url: '/plugin/charts/echarts',
                                        icons: 'simple-icons:apacheecharts',
                                        permissionKey: 'plugin_charts_echarts',
                                        isMenu: true,
                                        openType: 1
                                    },
                                    {
                                        name: 'AntV',
                                        url: '/plugin/charts/antv',
                                        icons: 'simple-icons:antdesign',
                                        permissionKey: 'plugin_charts_antv',
                                        isMenu: true,
                                        openType: 1
                                    }
                                ]
                            },
                            {
                                name: '地图',
                                url: '/plugin/map',
                                icons: 'mdi:map',
                                permissionKey: 'plugin_map',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: '视频',
                                url: '/plugin/video',
                                icons: 'mdi:video',
                                permissionKey: 'plugin_video',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: '编辑器',
                                icons: 'icon-park-outline:editor',
                                permissionKey: 'plugin_editor',
                                isMenu: true,
                                openType: 1,
                                items: [
                                    {
                                        name: 'markdown编辑器',
                                        url: '/plugin/editor/markdown',
                                        icons: 'ri:markdown-line',
                                        permissionKey: 'plugin_editor_markdown',
                                        isMenu: true,
                                        openType: 1
                                    }
                                ]
                            },
                            {
                                name: 'Swiper插件',
                                url: '/plugin/swiper',
                                icons: 'simple-icons:swiper',
                                permissionKey: 'plugin_swiper',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: '剪贴板',
                                url: '/plugin/copy',
                                icons: 'mdi:clipboard-outline',
                                permissionKey: 'plugin_copy',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: 'Hiprint示例',
                                url: '/plugin/hiprint',
                                icons: 'material-symbols:print',
                                permissionKey: 'plugin_hiprint',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: '图标',
                                url: '/plugin/icon',
                                localIcons: 'custom-icon',
                                permissionKey: 'plugin_icon',
                                isMenu: true,
                                openType: 1
                            }
                        ]
                    },
                    {
                        name: '异常页',
                        icons: 'ant-design:exception-outlined',
                        permissionKey: 'exception',
                        isMenu: true,
                        openType: 1,
                        items: [
                            {
                                name: '异常页403',
                                url: '/exception/403',
                                permissionKey: 'exception_403',
                                isMenu: true,
                                openType: 1,
                                icons: 'ic:baseline-block'
                            },
                            {
                                name: '异常页404',
                                url: '/exception/404',
                                permissionKey: 'exception_404',
                                isMenu: true,
                                openType: 1,
                                icons: 'ic:baseline-web-asset-off'
                            },
                            {
                                name: '异常页500',
                                url: '/exception/500',
                                permissionKey: 'exception_500',
                                isMenu: true,
                                openType: 1,
                                icons: 'ic:baseline-wifi-off'
                            }
                        ]
                    },
                    {
                        name: '表格示例',
                        icons: 'ant-design:exception-outlined',
                        permissionKey: 'table',
                        isMenu: true,
                        openType: 1,
                        items: [
                            {
                                name: '基础表格',
                                url: '/table/basic',
                                permissionKey: 'table_basic',
                                isMenu: true,
                                openType: 1
                            },
                            {
                                name: '编辑表格',
                                url: '/table/edit',
                                permissionKey: 'table_edit',
                                isMenu: true,
                                openType: 1
                            }
                            // {
                            //     name: '表头查询',
                            //     url: '/table/query',
                            //     permissionKey: 'table_query',
                            //     isMenu: true,
                            //     openType: 1
                            // },
                            // {
                            //     name: '工具栏',
                            //     url: '/table/toolbar',
                            //     permissionKey: 'table_toolbar',
                            //     isMenu: true,
                            //     openType: 1
                            // },
                            // {
                            //     name: '树形表格',
                            //     url: '/table/tree',
                            //     permissionKey: 'table_tree',
                            //     isMenu: true,
                            //     openType: 1
                            // },
                            //
                            // {
                            //     name: '空白表格',
                            //     url: '/table/edit1',
                            //     permissionKey: 'table_edit1',
                            //     isMenu: true,
                            //     openType: 1
                            // },
                            // {
                            //     name: '主子表格',
                            //     url: '/table/fs',
                            //     permissionKey: 'table_fs',
                            //     isMenu: true,
                            //     openType: 1
                            // },
                            // {
                            //     name: '菜单表格',
                            //     url: '/table/menu',
                            //     permissionKey: 'table_menu',
                            //     isMenu: true,
                            //     openType: 1
                            // }
                        ]
                    },
                    {
                        name: '关于',
                        url: '/about',
                        icons: 'fluent:book-information-24-regular',
                        permissionKey: 'about',
                        isMenu: true,
                        openType: 1
                    }
                ]
            }
        ] as Menu[]
    }
    return [] as Menu[]
})()
export default menus
